Optimal. Leaf size=30 \[ -\frac{B \cot ^2(c+d x)}{2 d}-\frac{B \log (\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0162874, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 34, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.088, Rules used = {21, 3473, 3475} \[ -\frac{B \cot ^2(c+d x)}{2 d}-\frac{B \log (\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 3473
Rule 3475
Rubi steps
\begin{align*} \int \frac{\cot ^3(c+d x) (a B+b B \tan (c+d x))}{a+b \tan (c+d x)} \, dx &=B \int \cot ^3(c+d x) \, dx\\ &=-\frac{B \cot ^2(c+d x)}{2 d}-B \int \cot (c+d x) \, dx\\ &=-\frac{B \cot ^2(c+d x)}{2 d}-\frac{B \log (\sin (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.0746224, size = 35, normalized size = 1.17 \[ -\frac{B \left (\cot ^2(c+d x)+2 \log (\tan (c+d x))+2 \log (\cos (c+d x))\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.048, size = 29, normalized size = 1. \begin{align*} -{\frac{B \left ( \cot \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-{\frac{B\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.8192, size = 54, normalized size = 1.8 \begin{align*} \frac{B \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 2 \, B \log \left (\tan \left (d x + c\right )\right ) - \frac{B}{\tan \left (d x + c\right )^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.73243, size = 131, normalized size = 4.37 \begin{align*} -\frac{{\left (B \cos \left (2 \, d x + 2 \, c\right ) - B\right )} \log \left (-\frac{1}{2} \, \cos \left (2 \, d x + 2 \, c\right ) + \frac{1}{2}\right ) - 2 \, B}{2 \,{\left (d \cos \left (2 \, d x + 2 \, c\right ) - d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 27.3717, size = 80, normalized size = 2.67 \begin{align*} \begin{cases} \tilde{\infty } B x & \text{for}\: \left (c = 0 \vee c = - d x\right ) \wedge \left (c = - d x \vee d = 0\right ) \\\frac{x \left (B a + B b \tan{\left (c \right )}\right ) \cot ^{3}{\left (c \right )}}{a + b \tan{\left (c \right )}} & \text{for}\: d = 0 \\\frac{B \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} - \frac{B \log{\left (\tan{\left (c + d x \right )} \right )}}{d} - \frac{B}{2 d \tan ^{2}{\left (c + d x \right )}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.40382, size = 167, normalized size = 5.57 \begin{align*} -\frac{4 \, B \log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 8 \, B \log \left ({\left | -\frac{\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - \frac{{\left (B + \frac{4 \, B{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}{\left (\cos \left (d x + c\right ) + 1\right )}}{\cos \left (d x + c\right ) - 1} - \frac{B{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]